package com.baosight.risk.webservice;

import com.baosight.risk.common.utils.ReadProperties;
import org.springframework.stereotype.Service;

/**
 * @desc: 指标内部数据值接口
 * @author: CuiShiHao
 **/
@Service
public class TargetWebService {

    /**
     * 磁盘存储路径根目录
     */
    private final String URL = ReadProperties.getValueString("target.url");

    /**
     * @description 调用方法
     * @author CuiShiHao
     * @date 2019/7/25
     */
    public String sendRequestResult(String jsonString) throws Exception {
        Object[] params = {jsonString};

        //正式环境是：http://bhwe.bgbd.baogang.info/services/ServiceMIJJW007?wsdl
        //String url = "http://bhwe.bgbdtest.baogang.info/services/ServiceMIJJW007?wsdl";
        WsCall call = new WsCall(URL, "getData");
        call.init();
        String result = (String) call.invokeOperate(params);
        System.out.println("调用结束！");
        return result;
    }
}
